﻿
@{
    ViewBag.Title = "GetValue";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div>
    <button id="bt">Button</button>
    <label id="la">Label</label>
    <input id="ip" value="Input"/>
    <textarea id="text">Textarea</textarea>
    <span id="sp">Span</span>
    
</div>

<script>
    $(document).ready(function () {
        var Button = $("#bt").text();
        var Label = document.getElementById('la').innerHTML;     //没有#
        var Input = $("#ip").val();
        var Textarea = $("#text").val();
        var Span = $("#sp").html();

        $("#bt").text('button');
        document.getElementById('la').innerHTML = "label";
        $("#ip").val('input');
        $("#text").val('textarea');
        $("#sp").html('span');
    });
</script>

